package com.zwan.oam_rtc.utils.messages;

import java.nio.ByteBuffer;

import com.zwan.oam_rtc.utils.wintcp.ByteTransfer;



public class RemoveFileMessage extends AbstractStruct {
    
//	companyid	Integer
//	toneid	Integer
//	Filepath	Varchar2(300)

    private int companyId = 0;
    private int toneId = 0;
    private byte[] filePath = new byte[300];
    
    private static int LENGTH = 308;
    
    @Override
    public void writeToBuffer(ByteBuffer bf) {
        bf.putInt(companyId);
        bf.putInt(toneId);
        bf.put(filePath);
    }

    @Override
    public void readFromBuffer(ByteBuffer bf) {
    	companyId = bf.getInt();
    	toneId = bf.getInt();
    	bf.get(filePath);
    }

    public int getCompanyId() {
		return companyId;
	}

	public void setCompanyId(int companyId) {
		this.companyId = companyId;
	}

	public int getToneId() {
		return toneId;
	}

	public void setToneId(int toneId) {
		this.toneId = toneId;
	}

	public String getFilePath() {
		return ByteTransfer.getString(filePath);
	}

	public void setFilePath(String filePath) {
		ByteTransfer.str2Byte(filePath, this.filePath);
	}
	
	@Override
    public int getLength() {
        return LENGTH;
    }

}
